<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="IskayitCreateDlg" widgetVar="IskayitCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreateIskayitTitle}">

            <h:form id="IskayitCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{iskayitController.selected != null}">

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_talepEdilenIsYeniDurumAciklama}" for="talepEdilenIsYeniDurumAciklama" />
                        <p:inputText id="talepEdilenIsYeniDurumAciklama" value="#{iskayitController.selected.talepEdilenIsYeniDurumAciklama}" title="#{bundle.CreateIskayitTitle_talepEdilenIsYeniDurumAciklama}" />

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_isLogTarihi}" for="isLogTarihi" />
                        <p:calendar id="isLogTarihi" pattern="MM/dd/yyyy HH:mm:ss" value="#{iskayitController.selected.isLogTarihi}" title="#{bundle.EditIskayitTitle_isLogTarihi}" required="true" requiredMessage="#{bundle.EditIskayitRequiredMessage_isLogTarihi}" showOn="button"/>

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_talepEdilenIsEskiDurumId}" for="talepEdilenIsEskiDurumId" />
                        <p:selectOneMenu id="talepEdilenIsEskiDurumId" value="#{iskayitController.selected.talepEdilenIsEskiDurumId}" >
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{isdurumuController.items}"
                                           var="talepEdilenIsEskiDurumIdItem"
                                           itemValue="#{talepEdilenIsEskiDurumIdItem}"
                                           itemLabel="#{talepEdilenIsEskiDurumIdItem.isDurumId.toString()}"
                                           />
                            <f:converter binding="#{isdurumuConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_logSahibiPersonelId}" for="logSahibiPersonelId" />
                        <p:selectOneMenu id="logSahibiPersonelId" value="#{iskayitController.selected.logSahibiPersonelId}" required="true" requiredMessage="#{bundle.EditIskayitRequiredMessage_logSahibiPersonelId}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{personelController.items}"
                                           var="logSahibiPersonelIdItem"
                                           itemValue="#{logSahibiPersonelIdItem}"
                                           itemLabel="#{logSahibiPersonelIdItem.personelId.toString()}"
                                           />
                            <f:converter binding="#{personelConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_talepEdilenIsId}" for="talepEdilenIsId" />
                        <p:selectOneMenu id="talepEdilenIsId" value="#{iskayitController.selected.talepEdilenIsId}" required="true" requiredMessage="#{bundle.EditIskayitRequiredMessage_talepEdilenIsId}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{talepedilenisController.items}"
                                           var="talepEdilenIsIdItem"
                                           itemValue="#{talepEdilenIsIdItem}"
                                           itemLabel="#{talepEdilenIsIdItem.talepId.toString()}"
                                           />
                            <f:converter binding="#{talepedilenisConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreateIskayitLabel_talepEdilenIsYeniDurumId}" for="talepEdilenIsYeniDurumId" />
                        <p:selectOneMenu id="talepEdilenIsYeniDurumId" value="#{iskayitController.selected.talepEdilenIsYeniDurumId}" required="true" requiredMessage="#{bundle.EditIskayitRequiredMessage_talepEdilenIsYeniDurumId}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{isdurumuController.items}"
                                           var="talepEdilenIsYeniDurumIdItem"
                                           itemValue="#{talepEdilenIsYeniDurumIdItem}"
                                           itemLabel="#{talepEdilenIsYeniDurumIdItem.isDurumId.toString()}"
                                           />
                            <f:converter binding="#{isdurumuConverter}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{iskayitController.saveNew}" value="#{bundle.Save}" update="display,:IskayitListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,IskayitCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="IskayitCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
